public class ComponentLeaf extends Component{
    public ComponentLeaf(String componentName,String componentJob) {
        super(componentName,componentJob);
    }

    @Override
    public boolean addChild(Component child) {
        return false;
    }

    @Override
    public boolean removeChild(Component child) {
        return false;
    }

    @Override
    public Component getChild(int childIndex) {
        return null;
    }

    @Override
    public void operation() {
        System.out.println("叶子结点："+getComponentName()+" 执行工作："+getComponentJob());
    }
}
